# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=perl-io-socket-ssl
pkgver=2.072
pkgrel=1
pkgdesc="Nearly transparent SSL encapsulation for IO::Socket::INET"
arch=('any')
license=('GPL' 'PerlArtistic')
url="https://search.cpan.org/dist/IO-Socket-SSL/"
depends=('perl-net-ssleay' 'perl' 'perl-uri')
checkdepends=('perl-io-socket-inet6')
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-${pkgver}.tar.gz)
sha512sums=('7a0abc8e9aaa9a0dc18a7dbfa540ef04a5c5ea21b171a6cbd5c3965ea497d1d7f74c3c9d9481497d6c63011842b11f4cf774737b48c3d5d3f70ae9d1cdc78f12')

build() {
  cd IO-Socket-SSL-${pkgver}
  yes | perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd IO-Socket-SSL-${pkgver}
  make test || warning "TLS 1.3 related errors"
}

package() {
  cd IO-Socket-SSL-${pkgver}
  make DESTDIR="${pkgdir}" install
}
